package fr.grassaud.hmvc.sample;

import fr.grassaud.hmvc.component.Model;
import fr.grassaud.hmvc.session.HMVCSession;
import fr.grassaud.hmvc.session.SessionContext;

@Model(controlledBy=ChildController.class)
public class ChildModel {

    
    @SessionContext
    private HMVCSession session;
    
    public void dynamicChangeModel(String s) {
	ChildEvent event = new ChildEvent(this);
	//just add some text to the data set by a component (view certainly ) 
	event.setData(s + " dynamic OK");
	
	session.sendModelEvent(this, event);
    }
}
